diff options
| author | Adam Soltys <[email protected]> | 2025-07-11 11:22:27 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-11 11:22:27 -0700 |
| commit | c588662026d9544c40faf1e4cbbb6454bf37193d (patch) | |
| tree | 38708f249841cc4a3041e8f402cccd6d0e8d7ba8 /src/routes/(app)/fund/[id]/+layout.server.ts | |
| parent | 7617102b14e5254c9675b7db34f12ff6906a0086 (diff) | |
| download | coinos-ui-c588662026d9544c40faf1e4cbbb6454bf37193d.tar.gz coinos-ui-c588662026d9544c40faf1e4cbbb6454bf37193d.zip | |
gift link page
Diffstat (limited to 'src/routes/(app)/fund/[id]/+layout.server.ts')
| -rw-r--r-- | src/routes/(app)/fund/[id]/+layout.server.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/routes/(app)/fund/[id]/+layout.server.ts b/src/routes/(app)/fund/[id]/+layout.server.ts new file mode 100644 index 00000000..3669eb7d --- /dev/null +++ b/src/routes/(app)/fund/[id]/+layout.server.ts @@ -0,0 +1,12 @@ +import getRates from "$lib/rates"; +import { get } from "$lib/utils"; + +export const load = async ({ depends, params: { id }, parent }) => { + depends("app:payments"); + const data = await get(`/fund/${id}`); + data.managers = await get(`/fund/${id}/managers`); + const rates = await getRates(); + const { user } = await parent(); + data.rate = rates[user?.currency || "USD"]; + return data; +}; |
